package com.meituan.sdk.model.ddzhkh.member.memberPointTransactionUpdate;

import com.meituan.sdk.annotations.ApiMeta;
import java.lang.Void;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 更新积分事务
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/member/point/transaction/update",
    businessId = 59,
    apiVersion = "10015",
    apiName = "member_point_transaction_update",
    needAuth = true
)
public class MemberPointTransactionUpdateRequest implements MeituanRequest<Void> {
    /**
    * <p data-diff-id="ct-diff-id-417ed6ac-afda-4eb6-901d-ef1e7bfb1be2">三方会员卡号ID</p>
    */
    @NotBlank(message = "outCardNum不能为空")
    @SerializedName("outCardNum")
    private String outCardNum;
    /**
    * <p data-diff-id="ct-diff-id-86f12bd8-84c8-4a5a-975e-d96283596b26">积分事务ID</p>
    */
    @NotNull(message = "transactionId不能为空")
    @SerializedName("transactionId")
    private Long transactionId;
    /**
    * <p data-diff-id="ct-diff-id-55c76f3b-4053-4552-98c0-5c2e9c4eae03">积分事务类型（1-增加，2-扣减）</p>
    */
    @NotNull(message = "transactionType不能为空")
    @SerializedName("transactionType")
    private Integer transactionType;
    /**
    * <p data-diff-id="ct-diff-id-34d4118d-8391-40c1-808c-c39664da8e20">积分数（正数，支持小数。按double解析）</p>
    */
    @NotBlank(message = "points不能为空")
    @SerializedName("points")
    private String points;
    /**
    * <p data-diff-id="ct-diff-id-6365f02f-905a-4d70-9235-9d1530286380">事务是否成功</p>
    */
    @NotNull(message = "transactionSuccess不能为空")
    @SerializedName("transactionSuccess")
    private Boolean transactionSuccess;
    /**
    * <p data-diff-id="ct-diff-id-b333e861-9e4f-4157-aed2-7b3b9120f1b5">事务失败原因</p>
    */
    @SerializedName("transactionFailReason")
    private String transactionFailReason;
    /**
    * <p data-diff-id="ct-diff-id-876c7136-50a7-4d94-a43f-f69587158ced">积分过期时间</p>
    */
    @SerializedName("expiryDate")
    private Long expiryDate;

    public String getOutCardNum() {
        return outCardNum;
    }
    public void setOutCardNum(String outCardNum) {
        this.outCardNum = outCardNum;
    }
    public Long getTransactionId() {
        return transactionId;
    }
    public void setTransactionId(Long transactionId) {
        this.transactionId = transactionId;
    }
    public Integer getTransactionType() {
        return transactionType;
    }
    public void setTransactionType(Integer transactionType) {
        this.transactionType = transactionType;
    }
    public String getPoints() {
        return points;
    }
    public void setPoints(String points) {
        this.points = points;
    }
    public Boolean getTransactionSuccess() {
        return transactionSuccess;
    }
    public void setTransactionSuccess(Boolean transactionSuccess) {
        this.transactionSuccess = transactionSuccess;
    }
    public String getTransactionFailReason() {
        return transactionFailReason;
    }
    public void setTransactionFailReason(String transactionFailReason) {
        this.transactionFailReason = transactionFailReason;
    }
    public Long getExpiryDate() {
        return expiryDate;
    }
    public void setExpiryDate(Long expiryDate) {
        this.expiryDate = expiryDate;
    }


    @Override
    public MeituanResponse<Void> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<Void>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "MemberPointTransactionUpdateRequest{" + "outCardNum=" + outCardNum + "," + "transactionId=" + transactionId + "," + "transactionType=" + transactionType + "," + "points=" + points + "," + "transactionSuccess=" + transactionSuccess + "," + "transactionFailReason=" + transactionFailReason + "," + "expiryDate=" + expiryDate + "}";
    }
}
